package com.hrcx.mystery.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <h1>商家商品请求参数封装类</h1>
 *
 * @author LinXiPeng
 * @className MerchantProductsSearchDto
 * @date 2021/12/11 15:25
 * Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "商家商品请求参数封装类")
public class MerchantProductsSearchDto implements Serializable {

    private static final long serialVersionUID = -2230783211787372394L;

    @ApiModelProperty(value = "商家编号")
    @NotNull
    private Integer merId;

    @ApiModelProperty(value = "类型（1：出售中（已上架），2：仓库中（未上架），3：已售罄，4：警戒库存，5：回收站）")
    @NotNull
    @Min(value = 1, message = "类型不能小于1")
    @Max(value = 5, message = "类型不能大于5")
    private Integer type;

    @ApiModelProperty(value = "关键字搜索， 支持(商品名称, 商品简介, 关键字, 商品条码)")
    private String keywords;

    @ApiModelProperty(value = "状态（false：未上架，true：上架）")
    private Boolean isShow;
}